package cn.java.exercises;

public class PayMeals
{
    public static void main(String[] args)
    {
        double dBalance=45;     //卡内余额
        double dFee;            //本次餐费

        dFee=30;
        if(dFee <0 )
        {
            System.out.println("餐费输入错误，请重新输入！");
        }
        else if(dBalance >= dFee)
        {
            System.out.println("本次扣款："+Double.toString(dFee)+",卡内余额："+Double.toString(dBalance-dFee)+",谢谢惠顾");
        }
        else
        {
            System.out.println("卡内余额不足，请充值");
        }
    }
}
